<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Android extends CI_Controller {
	
	public function index() {
		
	}
	
	public function moreapp() {
		
		$package = $this->input->get('pid');
		
		$response = array(
			"name"	=>	"UNG DUNG VIET", 
			"url"	=>	"market://search?q=pub:APP4VN"
		);
		
		if (stristr($package, "vn.gq.sm")) {
			$response['url'] = "market://search?q=pub:APP4VN";
		} else if (stristr($package, "vn.gq.cd") || stristr($package, "vn.gq.ts4u")) {
			$response['url'] = "market://search?q=pub:CUCDINH.VN";
		} else if (stristr($package, "vn.gq.cv")) {
			$response['url'] = "market://search?q=pub:COMICVIET";
		} else if (stristr($package, "vn.gq.udv4u")) {
			$response['url'] = "market://search?q=pub:UNG DUNG VIET 4U";
		}
		
		echo json_encode($response);
	}
	
}